<template>
	<view>
		<view class="get-coupon flex-y-center flex-x-center" v-if="data.get_coupon_list&&data.get_coupon_list.length>0">
    <view class="get-coupon-box" style="overflow: visible">
        <image class="get-coupon-bg" mode="widthFix" :src="data.__wxapp_img.coupon.bg.url"></image>
        <view class="flex-x-center mb-20">
            <image :src="data.get_coupon_list[0].type==2?'/static/images/icon-receive-coupon.png':'/static/images/img-get-coupon-title.png'" style="width: 226upx;height: 51upx"></image>
        </view>
        <scroll-view class="coupon-list" scrollY="true">
            <view class="coupon-item flex-y-center" v-for="(item,index) in data.get_coupon_list" :key="index">
                <image mode="widthFix" :src="data.__wxapp_img.coupon.item_bg.url" style="width: 100%;height: 100%"></image>
                <view style="width: 100%">
                    <view class="flex-row flex-y-center">
                        <view class="flex-grow-1 flex-row flex-y-bottom">
                            <view style="line-height: 1">￥</view>
                            <view style="font-size: 23pt;line-height: .85">{{item.sub_price}}</view>
                        </view>
                        <view class="flex-grow-0" style="font-size: 9pt;line-height: 32upx;">
                                满{{item.min_price}}元可用
                            </view>
                    </view>
                    <view @tap="$emit('hideGetCoupon',$event)" class="use-now" :data-url="item.url">立即使用</view>
                    <view style="font-size: 9pt">{{item.desc}}</view>
                </view>
            </view>
        </scroll-view>
        <view class="flex-x-center">
            <image @tap="$emit('closeCouponBox',$event)" :src="data.__wxapp_img.dapp.close3.url" style="width:100upx;height:100upx;"></image>
        </view>
    </view>
</view>

	</view>
</template>

<script>var myVue = {};
	export default {
		props:['data'],
		data() {
			return {
				
			};
		}
	}
</script>

<style scoped>

</style>
